home *** CD-ROM | disk | FTP | other *** search
- ╔═══════════════════════════════════════════════════╗
- ║ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ║
- ║ ▒ ▒ ║
- ║ ▒ DTMF Real-Time Decoder -- 486 DEMO Version ▒ ║
- ║ ▒ ▒ ║
- ║ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ║
- ║ ║
- ║───────────────────────────────────────────────────║
- ║ Shima-nized Advanced Utilities - J.M. Shima ║
- ║ Copyright (c) 1994-95 by James Shima ║
- ║ All Rights Reserved ║
- ║ ║
- ╚═══════════════════════════════════════════════════╝
-
-
- ▐▐▐▐ R E F E R E N C E M A N U A L ▐▐▐▐
-
-
-
-
-
- » Type DTMF486D at the DOS prompt for a summary of options «
-
-
-
- INTRODUCTION
- ▀▀▀▀▀▀▀▀▀▀▀▀
-
- * This program functions as a real-time DTMF decoder. One application
- where DTMF tones are used is in the standard American telephone dialing
- system. The standard DTMF tones represent the numbers 1,2,3,4,5,6,7,
- 8,9,0,*,# on a standard keypad interface. The four reserved DTMF tones
- representing A,B,C,D are supported in the REGISTERED version.
-
- * This program is capable of decoding DTMF tones from a Soundblaster
- Version 1.0 - 2.0, Soundblaster Pro, or TRUE Soundblaster compatible
- (16-bit or 8-bit) sound card in real-time. Soundblaster 16 support
- has been reported to work but is fully untested at this point.
-
- * This 486 version is geared toward persons with a 486DX PC or better.
- This version can be used by slower machines, but results will
- be error prone due to the non real-time processing.
-
- * If your PC DOES NOT perform equivalent to a 486DX-25 or better,
- a quasi real-time switch is supported. However, due to the nature
- of real-time processing, this means data will be lost and results
- may vary from system to system.
-
- * The Soundblaster or compatible sound card MUST be connected to port
- address 220h and using DMA 1 (the factory settings).
-
- * The input to the Soundblaster mic or line input can originate
- from any external communication device that supplies DTMF tones
- to the sound card.
-
- * This program accepts COMMAND-LINE ARGUMENTS that are passed to the
- DTMF decoder.
-
- * For a list of the arguments, type DTMF486D at the DOS prompt.
-
- * The DEMO only decodes a maximum of 5 numbers. Interested
- persons can receive the REGISTERED version with no limitations.
-
-
- SOFTWARE LICENSE
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- The 486 DEMO version of the DTMF real-time decoder is shareware, and is free
- for personal use only. This is true as long as the DEMO is not alterted
- in any fashion. Registered users will receive the REGISTERED version of
- the DTMF decoder and will receive documentation stating such.
-
-
- The author offers no warranties on this program. This program is provided
- as is. Use this program at your own risk. I assume no responsibility in your
- actions while you are using this program. The author is not liable for any
- damage caused to your computer while you are using this program. Using
- the program is your compliance to this statement and the license.
-
-
- COMMAND-LINE ARGUMENT SCREEN
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- The program argument screen should look as follows:
-
- Real-Time Dual-Tone Multi-Frequency Decoder, 486 DEMO Version
- Shima-nized Advanced Utilities (c) 1994-95 - J.M. Shima
-
- USAGE: DTMF486D <sample_rate> switches:[ <-t>number <-r>]
-
- Notes: <sample_rate> = rate of incoming samples in Hz. The range
- is 4000 < fs < 12000 for DTMF decoding.
- The RECOMMENDED value is 4000 Hz for real-time
- decoding.
-
- ** Sound card must be Soundblaster 1.0 - 2.0, Pro, or Soundblaster
- ** compatible connected to port 220h using DMA 1 (The factory settings).
-
- Switches: -t = Defines the S/N threshold value (in dB) that DTMF tones
- must surpass for proper detection.
- The threshold S/N value can be any real, non-negative number.
- DEFAULT value is 20 dB.
- -r = Enable real-time mode. Use this for a 486DX-25 machine or up.
- Otherwise, use quasi real-time mode which is probable to
- give inconsistent results. Real-time mode is OFF by DEFAULT.
-
-
- EXPLANATION OF COMMAND-LINE ARGUMENTS
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- <sample_rate> --> Input sample rate. Must be in the range of 4000 to
- 12000 Hertz (Hz). For DTMF detection, it is HIGHLY
- RECOMMENDED THAT YOU USE 4000 Hz for real-time
- processing. However, testing indicated that a
- 486DX-66 could perform real time processing with a
- 8000 Hz sample rate.
-
- Switches:
- ════════
-
- -t<number> --> The threshold that the DTMF tones must exceed over the
- noise floor for detection (in dB). Typically, strong
- DTMF tones will be 20-40 dB stronger than the noise
- in the signal. However, noisy signals lower this
- signal-to-noise (S/N) ratio. The threshold parameter
- allows the user to set the S/N threshold for detection
- of noisier or corrupted DTMF tones.
-
- * NOTE: If nothing is entered, then the DEFAULT S/N
- threshold value is 20dB, which is a figure
- of merit for normal tones.
-
- One must realize that dB is a logarithmic scale
- of signal gain through the equation:
- dB = 20 * log(signal gain).
- Thus, a large signal gain represents a small
- increase in the dB number (i.e. 40dB is a 100x
- signal gain, while 20dB is a 10x signal gain).
-
- -r --> Enables TRUE real-time processing mode. Include this
- switch if your system is capable of handling the
- flow rate of data. Rule of thumb: A 486DX-33 can
- probably handle real-time.
-
- ** NOTE: Results will VARY from system to system.
-
- By default, a quasi real-time process is included
- for slower machines. Obviously, this means data will
- be lost due to computational overhead, put I have
- tried to STRATEGICALLY MINIMIZE the effects of this.
-
-
-
- EXAMPLES OF RUNNING DTMF486D
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- * Program start: Run the program by typing the executable name.
- * Program end: The program ENDS when ANY key is hit during decoding!
-
-
- DTMF486D 4000 --> Input sample rate is 4000 Hz. Quasi real-time
- mode is enabled by default. Input S/N
- threshold defaults to 20dB.
-
- DTMF486D 4000 -t25 --> Input sample rate is 4000 Hz. The input
- S/N threshold is set to 25dB. Quasi real-time
- mode is enabled.
-
- DTMF486D 4000 -r -t15 --> Input sample rate is 4000 Hz. The S/N
- threshold is set to 15dB. Real-time mode
- for fast machines is enabled.
-
-
- IMPORTANT NOTES
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- Since this is a real-time piece of software, certain rules must be followed
- for proper use.
-
- Sampling rate:
- Increasing the sampling rate means that samples are ready
- faster. Thus, the computer has less time to do what
- is has to before it has to fetch more samples. So,
- one must make the sample rate as low as it can go
- and still represent the maximum frequency in the signal.
- For DTMF tones, this minimum sampling rate is 4000 Hz,
- (due to Nyquist theorem). IT BEHOOVES YOU to use this rate.
- Sampling at a rate higher than necessary gains you
- nothing, but INCREASES your computational overhead. For real-
- time operation, make your sampling rate as low as you can
- without violating Nyquist theorem (2x the maximum freq.
- in the signal). So, for all practical purposes, use
- 4000 Hz as your sampling rate.
-
- Real-time processing:
- If your system cannot handle real-time processing, that
- means data will be lost. While your system is processing
- the old data, it doesn't have time to retrieve the new
- data coming in. This new data is discarded and the
- computer picks up fresh data when it's done with its
- current task. Thus, results are inconsistent when real-time
- processing cannot be done. The probability of detecting
- a given tone depends on where your computer is in its
- processing stage. You can see that its nearly impossible
- to debug whether or not real-time processing is happening
- or not. On top of this, your CPU takes care of many other
- housekeeping tasks. Therefore, I have deemed "real-time"
- on the fact that a DTMF tone does not go undetected as given
- in the DTMF standards. Closely spaced tones will be detected
- in real-time if your system can run the code in real time.
-
- However, you can also decode all DTMF tones if there
- is enough time between tones and your computer works
- fast enough so to extract some data from each tone.
- In this case, the decoder is not working in real time
- but is able to extract data since a tone exists for
- a longer amount of time than it takes to perform a detection.
- In other words, longer DTMF tones are better detected
- in quasi real-time mode. DTMF tones invoked by humans
- are very long compared to the time it takes your computer
- to detect them, so in quasi-real time mode you should
- be able to get good results. This is why probability
- governs the detection process in the quasi real-time case.
-
- Noisy DTMF tones are also error ridden since the processing
- window is so small no noise immunity algorithm can be
- implemented. Note that non-pure tones may not be detected
- properly!
-
-
-
- INCLUDED FILES
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- DTMF486D.EXE --> DTMF real-time decoder, DEMO version.
- DTMF486D.DOC --> This file.
- REGISTER.DOC --> Registration form.
-
-
-
- REGISTRATION
- ▀▀▀▀▀▀▀▀▀▀▀▀
-
- ** For registration, please fill out REGISTER.DOC and see the DEMO screen.
- Specify media dispersement.
-
- The REGISTERED version of this program allows unlimited decoding of numbers,
- and offers other features including:
-
-
-
- 1) Automatic logging of the resulting decoded numbers to a log file.
- The session is also time and date stamped.
-
- 2) Time monitoring switch. Allows deciphering of incoming streams of
- numbers if tone activity is not detected for a set number of seconds.
-
- 3) Supports the extended DTMF tones A,B,C,D.
-
- 4) REGISTERED users will also receive a DTMF generator program. This is
- a DTMF tone generator which allows you to create any DTMF sequence
- you wish. The program allows you to specify a DTMF number sequence,
- the sampling rate, and how long you want the pulses to be (in samples).
-
-
-
- TESTING
- ▀▀▀▀▀▀▀
-
- I have thoroughly tested this code and I am not responsible for any mishaps
- that may happen when run on your computer.
-
- SOUND CARDS TESTED:
-
- Aztec Sound Galaxy 16 bit
- Sound Blaster 8 bit
- Sound Blaster ASP 16
- Generic SB fully compatible 16 bit
- Sound Blaster 16 VE *
-
- * Some problems with the SB 16 VE have been reported and verified.
- Mic and line inputs for the SB 16 VE gave spurious results. No
- explanation for this hardware problem has been determined.
-
-
- TESTING PLATFORMS:
-
- 1) The code was tested on an IBM compatible 25MHz 486DX Cyrix upgrade PC
- with a Soundblaster Version 1.5 sound card running DOS 5.0. Tones
- were recorded onto a cassette tape and played into a microphone which
- was connected to the mic input of the Soundblaster card. It was able
- to run in quasi real-time mode with a 4000 Hz sample rate and decoded
- numbers with approximately 90% accuracy. Real-time mode was
- unachievable but gave similar results. Using this test vector data,
- normal dialing was decoded 95% of the time. Burst dialing was
- decoded 95% of the time. Noisy tones gave inconsistent results.
-
- ** NOTE: All captured numbers were correctly decoded, the errors
- stemmed from the fact that real-time decoding was not possible!
-
-
-
- 2) The code was also tested on a 486DX2-66 with an Aztec Sound
- Galaxy 16-bit Soundblaster compatible sound card. The code was ABLE
- to run in REAL-TIME on a 486DX2-66 with sample rates of 4000 Hz and
- 8000 Hz!! Using recorded test vector data, DTMF decoding was 100%
- accurate! Normal and burst dialing were decoded 100% of the time.
- Again, noisy tones were inconsistent due to the streamlined algorithm.
-
- Every action has been taken to ensure an error-free program.
-
- Note, incompatibilities may stem from hardware deviations.
- For optimal performance, DO NOT launch this program while running under
- Microsoft Windows.
-
-
- For more information,
-
- EMAIL: shima@cyberramp.net
-
- US MAIL: J.M. Shima
- 18909 Lloyd Circle Apt. 1232
- Dallas, TX 75252
-
-
- TRADEMARKS
- ▀▀▀▀▀▀▀▀▀▀
-
- Soundblaster is a trademark of Creative Lab's Inc.
- Microsoft Windows and DOS is a trademark of Microsoft.
-